package com.ssm.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;
import java.io.Serializable;

/**
 * (ElcNotice)实体类
 *
 * @author makejava
 * @since 2021-06-01 10:40:40
 */
public class ElcNotice implements Serializable {
    private static final long serialVersionUID = 225810986458952283L;
    /**
     * 公告id
     */
    private Integer id;
    /**
     * 信息类型id
     */
    private Integer infoTypeId;
    /**
     * 标题
     */
    @NotBlank(message = "标题不能为空")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5^a-z^A-Z^0-9\\w,.，？?!！。‘’“”'()（）]+$",message ="输入不符合规范")
    @Length(message = "标题必须为1~20位字符",min = 1,max = 20)
    private String title;
    /**
     * 公告内容
     */
    @NotNull(message = "公告不能为空")
    private Object content;
    /**
     * 发布人id
     */
    private Integer userId;
    /**
     * 是否可评
     */
    private Integer isComment;
    /**
     * 是否启用
     */
    private Integer isEnable;
    /**
     * 是否置顶
     */
    private Integer isTop;
    /**
     * 点击量
     */
    private Integer clicks;
    /**
     * 是否删除
     */
    private Integer del;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;
    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;
    /**
     * 客户id
     */
    private Integer dpid;

    private String user_name;

    private String type_name;

    public String getType_name() {
        return type_name;
    }

    public void setType_name(String type_name) {
        this.type_name = type_name;
    }

    public String getUser_name() {
        return user_name;
    }

    public void setUser_name(String user_name) {
        this.user_name = user_name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getInfoTypeId() {
        return infoTypeId;
    }

    public void setInfoTypeId(Integer infoTypeId) {
        this.infoTypeId = infoTypeId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Object getContent() {
        return content;
    }

    public void setContent(Object content) {
        this.content = content;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getIsComment() {
        return isComment;
    }

    public void setIsComment(Integer isComment) {
        this.isComment = isComment;
    }

    public Integer getIsEnable() {
        return isEnable;
    }

    public void setIsEnable(Integer isEnable) {
        this.isEnable = isEnable;
    }

    public Integer getIsTop() {
        return isTop;
    }

    public void setIsTop(Integer isTop) {
        this.isTop = isTop;
    }

    public Integer getClicks() {
        return clicks;
    }

    public void setClicks(Integer clicks) {
        this.clicks = clicks;
    }

    public Integer getDel() {
        return del;
    }

    public void setDel(Integer del) {
        this.del = del;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getDpid() {
        return dpid;
    }

    public void setDpid(Integer dpid) {
        this.dpid = dpid;
    }

    @Override
    public String toString() {
        return "ElcNotice{" +
                "id=" + id +
                ", infoTypeId=" + infoTypeId +
                ", title='" + title + '\'' +
                ", content=" + content +
                ", userId=" + userId +
                ", isComment=" + isComment +
                ", isEnable=" + isEnable +
                ", isTop=" + isTop +
                ", clicks=" + clicks +
                ", del=" + del +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", dpid=" + dpid +
                ", user_name='" + user_name + '\'' +
                ", type_name='" + type_name + '\'' +
                '}';
    }
}
